define(["jquery", "easy-admin"], function ($, ea) {

    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'crm/customer.record/index',
        delete_url: 'crm/customer.record/delete'
    };

    var Controller = {

        index: function () {

            ea.table.render({
                init: init,
				toolbar:['refresh'],
                cols: [[
                    { type: "checkbox" },
                    { field: 'id', title: 'ID', sort: true ,width: 60},
                    { field: 'content', title: '内容' },
                    { field: 'create_user',title: '创建人',templet:function(d){return d.create_user.username},width: 80 },
					{ field: 'record_type', title: '跟进类型',width: 80},
                    { field: 'create_time', title: '创建时间',width: 160 },
                    { field: 'next_time', title: '下次跟进' ,width: 160},
					{
						width: 70,
						title: '操作',
						align: "center",
						fixed: 'right',
						templet: ea.table.tool,
						operat: [
							'delete'
						]
					}
                ]],
            });

            ea.listen();
        }
    };
    return Controller;
});